/*
 * @Author: 李小晴 2689279066@qq.com
 * @Date: 2023-06-13 13:55:22
 * @LastEditors: 李小晴 2689279066@qq.com
 * @LastEditTime: 2023-07-18 16:00:56
 * @FilePath: \sys\src\api\sp\feed\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { useAxios } from '@/hooks/web/useAxios'
const request = useAxios()

import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()

// 列表
export const spDrugListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spDrugList',
      data: data
    }
  })
}
// 新增
export const spDrugAddAdminApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spDrugAddAdmin',
      data: data
    }
  })
}
// 编辑
export const spDrugEditApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spDrugEdit',
      data: data
    }
  })
}
// 删除
export const spDrugDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spDrugDel',
      data: data
    }
  })
}
// 药品批次列表
export const spDrugBatchListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spDrugBatchList',
      data: data
    }
  })
}

// 药品出入库列表
export const spDrugStockInOutLogListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spDrugStockInOutLogList',
      data: data
    }
  })
}
